import React from 'react'
import { View } from '@tarojs/components'
import { Icon } from '../Icon'

import './index.scss'

export interface ICardProps {
    title: string
    rightText?: string
    iconClick?: ()=>  void
}
export const Card: React.FC<ICardProps> = ({
    children,
    title
})=>{

    return (
        <View className="xxm-card-box">
          <View className="xxm-card-box__header">
            <View className="xxm-card-box__title xxm-ellipse">
               {title}
            </View>
            <View className="xxm-card-box__right">
                <Icon name="arrow-right" size={16}></Icon>
            </View>
          </View> 
          <View className="xxm-card-box__content">
              {children}
          </View>
        </View>
    )
}